<?php
include_once 'sends_protoweb.php';

/**
 * @package Protoweb
 * @subpackage controller
 */
class Sends extends Sends_protoweb {

  public function __construct() {
    parent::__construct();
  } // end of method __construct()


  public function read($send_id=0) {

    // check if numeric to prevent creating false records
    if (is_numeric($send_id)) {
      // Update read and bounced status 
      $send          = new Send($send_id);
      $send->bounced = 0;
      $send->read++;
      $send->save();
    }

    // path to transparent img
    $transparent = BASEPATH . "application/views/img/transparent.gif";

    header('content-type: image/gif'); 
    die(file_get_contents($transparent));
  }
  
} // class Sends

/* End of file sends.php */
/* Location: ./system/application/controllers/sends.php */